<template>
  <div class="about">
    <!-- 登录 -->
    <div>
      <p>
        用户名：
        <input v-model="name" />
      </p>
      <p>
        密码：
        <input v-model="pass" />
      </p>
      <p>
        加密后密码：
        <input v-model="enpass" />
      </p>
      <button @click="login">登录</button>
     
      redirect{{repath}}
    </div>
  </div>
</template>
<script>
import {Message} from 'element-ui'
import router from '../router'
import utils from '../utils/utils'

export default {
  
  data() {
    return {
      name: "mm",
      pass: "8888",
      enpass:"no jiami",
      okToken:null,
      repath:null
    };
  },
  beforeCreate: function() { 

      //console.log("创建前")            
      //window.location.href = "https://www.baidu.com"      

  },
  created:function(){
    
  },
  mounted:function(){
    this.repath=this.$route.query.redirect;
    let  en = new JSEncrypt()
      en.setPublicKey("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtID8+nPhjcHtIIo+ACbcx4ijCyNMXRZeP5dCIaYaS915lFtrwFUPPzpTwA3OS12zQjowKh/v7ING0KhVQ66n+kI5oEUdAyqrBEYGCoUDszQ9SRm/zb3KR1dMjKrhRLEC3Q5h7zR7QMLKYg0/Qj0tJtHXsUMjxGE6Wes9dCNKewQIDAQAB")

      console.log("加密中。。。"+this.enpass)
      let rsaPassWord =en.encrypt(this.pass);
      this.enpass = rsaPassWord;
      console.log("加密后。。。"+this.enpass)

  },
  components: {},

  methods: {
    login: function() {
      const _this = this
      
      
          
    },
    
   
    //每次请求 验证token
    
    
  }
};
</script>